<?php
/**
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* 
* @copyright Copyright (c) 2008-2009 Ne8, LLC <josh.ribakoff@gmail.com>
* @license New BSD License
* @version 0.1
* @category Shuffler
* @package Shuffler_Mapper
*/
class Shuffler_Mapper_IdentityMap
{

    private $array;
    
    public function get( $id )
    {
        return isset( $this->array[ $id ] ) ? $this->array[ $id ] : NULL;   
    }
    
    public function add( Shuffler_Model $arg )
    {
        $this->array[ $arg->getId() ] = $arg;
    }
    
    public function clear()
    {
        $this->array = array();
    }
       
}